<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>float</title>
    <style>
    .horizontal {
        background-color: aqua;
        width: 1000px;
        height: 700px;
    }
    .block-one {
        float: left;
        background-color:burlywood;
        width: 300px;
        height: 300px;
    }
    .block-two {
        float: left;
        background-color: brown;
        width: 300px;
        height: 300px;
    }
    .block-three {
        float: left;
        background-color:cadetblue;
        width: 300px;
        height: 300px;
    }
    .block-four {
        float: left;
        background-color:salmon;
        width: 300px;/* 把这个数值改成100px看看会发生什么吧 */
        height: 300px;
    }
    </style>
</head>
<body>
    <!-- 横向举例 -->
    <div class="horizontal">
        <div class="block-one"></div>
        <div class="block-two"></div>
        <div class="block-three"></div>
        <div class="block-four"></div>
    </div>
</body>
</html>